<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>flex</title>
  <style>
    html,
    body {
      height: 100%;
      margin: 0;
    }

    body {
      display: -webkit-flex;
      display: flex;
      -webkit-align-items: center;
      align-items: center;
      -webkit-justify-content: center;
      justify-content: center;
    }

    .box {
      width: 400px;
      height: 200px;
      background-color: #ccc;
      position: relative;
      overflow: hidden;
    }

    .box::before,
    .box::after {
      content: '';
      background-color: #fc0;
      position: absolute;
      width: 100px;
      height: 100px;
      border-radius: 50px;
    }

    .box::before {
      margin-top: -50px;
      margin-left: -50px;
    }

    .box::after {
      margin-bottom: -50px;
      margin-right: -50px;
      bottom: 0;
      right: 0;
    }
  </style>
</head>
<body>
<div class="box"></div>
</body>
</html>
